package com.gs.coursera.algorithms.core.ksp;

public class Item implements Comparable<Item>{

	private final int v;
	private final int w;
	private final double r;
	
	public Item(int v, int w) {
		this.v = v;
		this.w = w;
		this.r = v / w;
	}

	public int getV() {
		return v;
	}

	public int getW() {
		return w;
	}

	public double getR() {
		return r;
	}
	
	public int compareTo(Item o) {
		return new Double(r).compareTo(new Double(o.r));
	}
	
}
